import request from '@/utils/request'

// 查询任务管理列表
export function listTask(query) {
    return request({
        url: '/businessWorkbench/task/list',
        method: 'get',
        params: query
    })
}

// 查询任务管理详细
export function getTask(id) {
    return request({
        url: '/businessWorkbench/task/' + id,
        method: 'get'
    })
}

// 新增任务管理
export function addTask(data) {
    return request({
        url: '/businessWorkbench/task',
        method: 'post',
        data: data
    })
}

// 修改任务管理
export function updateTask(data) {
    return request({
        url: '/businessWorkbench/task',
        method: 'put',
        data: data
    })
}

// 删除任务管理
export function delTask(id) {
    return request({
        url: '/businessWorkbench/task/' + id,
        method: 'delete'
    })
}

// 导出任务管理
export function exportTask(query) {
    return request({
        url: '/businessWorkbench/task/export',
        method: 'get',
        params: query
    })
}

export function treeTask(query) {
    return request({
        url: '/businessWorkbench/task/treeselect',
        method: 'get',
        params: query
    })
}

//导入清单
export function importData(data) {
    return request({
        url: '/businessWorkbench/task/importData',
        method: 'post',
        data: data
    })
}

//导入模板
export function importTemplate(guid, id) {
    return request({
        url: '/businessWorkbench/task/' + guid + '/' + id,
        method: 'get'
    })
}